<%--
  Created by IntelliJ IDEA.
  User: libing
  Date: 2016/7/23
  Time: 12:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib uri="http://www.rapid-framework.org.cn/rapid" prefix="rapid" %>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.1.10.1.min.js"></script>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/common01.css"/>

    <script type="text/javascript">
        function deleteItems(){
            document.itemsForm.action="${pageContext.request.contextPath }/admin/deleteCompanyUsers.action";
            document.itemsForm.submit();
        }
    </script>

</head>
<body>
<%--<rapid:override name="top">
这里如果不想改变父页面的内容的话，就不要写出来了，否则会认为你重写了父页面的这个top
</rapid:override>--%>
<div class="container clearfix">

    <rapid:override name="main_wrap">

        <form name="itemsForm" action="${pageContext.request.contextPath }/admin/returnCompanyUsersByText.action" method="post" id="itemsForm">
            <table width="100%" border=1>
                <tr>
                    <td>公司名称：<input type="text" name="companyName"/></td>
                    <td>
                        <input type="submit" value="查询"/>
                        <input type="button" value="批量删除" onclick="deleteItems()"/>
                    </td>
                </tr>
            </table>


        <table align="center" class="main_wrap_table" id="customers" width="300%">
            <tr>
                <td>选择</td>
                <td>id</td>
                <td>公司名称</td>
                <td>公司联系人</td>
                <td>联系电话</td>
                <td>公司地址</td>
                <td>状态</td>
                <td>操作</td>
            </tr>

            <c:forEach items="${list}" var="lists">
                <tr>
                    <td><input type="checkbox" name="items_id" value="${lists.companyId }"></td>
                    <td>${lists.companyId }</td>
                    <td>${lists.companyName }</td>
                    <td>${lists.contacterName}</td>
                    <td>${lists.telephoneNum}</td>
                    <td>${lists.city.cityName}</td>
                    <td id="status" class="status_c">
                    <c:choose>
                        <c:when test="${lists.sStatus == 0}">
                            正常状态
                        </c:when>
                        <c:otherwise>
                            已被封号
                        </c:otherwise>
                    </c:choose>
                    </td>
                    <td><a href="${pageContext.request.contextPath }/admin/deleteCompanyUserById.action?id=${lists.companyId}&page=${currentPage}">删除</a> |<a href="${pageContext.request.contextPath }/admin/selectCompanyDetail.action?companyId=${lists.companyId}">详情</a> | <a href="${pageContext.request.contextPath }/admin/changeStatus.action?page=${currentPage}&status=${lists.sStatus}&id=${lists.companyId}&flag=0" class="status_class" id="status_click">
                        <c:choose>
                        <c:when test="${lists.sStatus == 0}">
                            封号
                        </c:when>
                        <c:otherwise>
                            解号
                        </c:otherwise>
                    </c:choose></a>
                    </td>

                </tr>
            </c:forEach>

        </table>

        </form>
        <div id="page">
            <ul>
                <li class="first"><a href="${pageContext.request.contextPath }/admin/returnCompanyUsers.action?page=1">&nbsp;首页&nbsp;</a></li>
                <li class="upPage"><a href="${pageContext.request.contextPath }/admin/returnCompanyUsers.action?page=
                <c:choose>
                    <c:when test="${currentPage-1 <= 0}">
                        1
                    </c:when>
                    <c:otherwise>
                        ${currentPage-1}
                    </c:otherwise>
                </c:choose>
                ">&nbsp;上一页&nbsp;</a></li>
                <li class="nextPage"><a href="${pageContext.request.contextPath }/admin/returnCompanyUsers.action?page=${currentPage+1}">&nbsp;下一页&nbsp;</a></li>
            </ul>
        </div>
    </rapid:override>



</div>

</body>
</html>
<%@include file="../common/templateJSP.jsp"%>
